package com.leaf.spring.y201907.day24.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.leaf.spring.y201907.day24.role.Producer;

@RestController
public class OrderController {

	@Autowired
	private Producer producer;
	
	@GetMapping("index")
	public String index(String message) {
		producer.send(message);
		return message;
	}
	
}
